home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / dosguide.exe / HELPDOS.ZIP / SHIFT.HLP < prev    next >
Text File  |  1985-09-03  |  1KB  |  46 lines

  1. ---------------------  SHIFT - Internal Batch Subcommand  ----------------------
  2.  
  3. SHIFT allows a batch file to make use of more than ten replaceable parameters
  4.    entered on the command line.
  5.  
  6. FORMAT:   SHIFT
  7.  
  8. REMARKS:
  9.  
  10.    There are ten replaceable parameters, numbered %0 - %9.  More than ten
  11.    parameters may be used by "shifting" them.  SHIFT moves each parameter on
  12.    the command line one position to the left, so that %0 becomes %1, %1 becomes
  13.    %2, and so on.  Subsequent SHIFTs continue to move parameters one position
  14.    lower.
  15.  
  16. EXAMPLE:
  17.  
  18. The following batch file, ECHOIT.BAT, echoes (displays) the values of
  19. replaceable parameters, SHIFTs them, and echoes their values again.  The default
  20. drive is A:
  21.  
  22.           ECHO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  23.           SHIFT
  24.           ECHO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  25.           SHIFT
  26.           ECHO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
  27.  
  28. Invoking the batch file with:
  29.  
  30.           ECHOIT 1 2 3 4 5 6 7 8 9 10 11
  31.  
  32. produces:
  33.  
  34.           A>ECHO ECHOIT 1 2 3 4 5 6 7 8 9
  35.           ECHOIT 1 2 3 4 5 6 7 8 9
  36.  
  37.           A>SHIFT
  38.  
  39.           A>ECHO 1 2 3 4 5 6 7 8 9 10
  40.           1 2 3 4 5 6 7 8 9 10
  41.  
  42.           A>SHIFT
  43.  
  44.           A>ECHO 2 3 4 5 6 7 8 9 10 11
  45.           2 3 4 5 6 7 8 9 10 11
  46.